<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<link href="https://cdn.staticfile.net/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.staticfile.net/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>
<script src="https://at.alicdn.com/t/c/font_4481751_zjd77de42z.js"></script>
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <style>
        .register-link {
            text-align: left;
        }
        #box {
            display: block;
            margin: 0 auto;
        }
    </style>
    <link rel="icon" href="/chat/image/favicon.ico" type="image/x-icon">
</head>
<body>
<svg class="emojy-item" aria-hidden="true" id="box">
    <use xlink:href="#icon-box"></use>
</svg>
<form th:action="@{/login}" method="post">
    <table style="text-align: center; margin-left: auto; margin-right: auto">
        <tr>
            <td colspan="2">
                <label style="color: red" th:text="${message}"></label> <br>
                <label style="color: green" th:text="${success}"></label> <br>
                <div class="input-group has-validation">
                    <span class="input-group-text">用户名:</span>
                    <div class="form-floating is-invalid">
                        <input type="text" class="form-control" id="username" placeholder="用户名" name="username" required>
                        <label for="username">用户名</label>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="input-group has-validation" style="margin-top: 20px">
                    <span class="input-group-text">密&nbsp;&nbsp;&nbsp;&nbsp;码:</span>
                    <div class="form-floating is-invalid">
                        <input type="password" class="form-control" id="password" placeholder="密码" name="password" required>
                        <label for="password">密码</label>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div class="col-12" style="margin-top: 20px">
                    <button class="btn btn-primary btn-lg" type="submit">登录</button>
                </div>
            </td>
        </tr>
        <tr>
            <td class="register-link">
                <a href="/chat/register">注册账号</a>
            </td>
        </tr>
    </table>
</form>
</body>
</html>